#! /bin/env bash
which tmux || yum install -y tmux
which zip || yum install -y zip
which vim || yum install -y vim
which tree|| yum install -y tree
which jq || yum -y install jq
which bzip2 || yum -y install bzip2
which colordiff || yum -y install colordiff
git config --global credential.helper "cache --timeout=3600"
git config --global core.editor "/usr/bin/vim"
git config --global user.name "Andy Zhang"
git config --global user.email "leowa@outlook.com"
git config --global core.filemode "true"
grep interactive ~/.gitconfig || echo "[color]
  diff = auto
  status = auto
  branch = auto
  interactive = auto
  ui = true
  pager = true
" >> ~/.gitconfig
cd `dirname $0`
ln -s -f `pwd`/conf/tmux.conf ~/.tmux.conf
ln -s -f `pwd`/conf/bash_profile_linux ~/.bash_profile
ln -s -f `pwd`/conf/bash_aliases_linux ~/.bash_aliases
./setup_vim_linux.sh
cd -
grep PS1 ~/.bashrc || echo "PS1=\"\[\033[01;31m\]\u@$(ifconfig eth0 | grep 'inet ' | awk ' {print $2}') \w $\[\033[00m\]\"" >> ~/.bashrc
